﻿CREATE TABLE [dbo].[Repairs] (
    [Id]             INT            IDENTITY (1, 1) NOT NULL,
    [WorkOrderId]    NVARCHAR (50)  NOT NULL,
    [ComputerNumber] NVARCHAR (50)  NULL,
    [ArticleId]      INT            NOT NULL,
    [mtStaff]        INT            NOT NULL,
    [finishMtTime]   DATETIME       NULL,
    [applyMtTime]    DATETIME       NULL,
    [statusId]       INT            NULL,
    [mtAddress]      NVARCHAR (50)  NULL,
    [applyMtStaffid] INT            NULL,
    [Email]          NVARCHAR (50)  NULL,
    [Phone]          NCHAR (11)     NULL,
    [WhoArrange]     INT            NULL,
    [Rate]           INT            NULL,
    [Evaluat]        NVARCHAR (50)  NULL,
    [Reason]         NVARCHAR (60)  NULL,
    [DeleteMark]     INT            NOT NULL,
    [SortCode]       INT            NULL,
    [Description]    NVARCHAR (800) NULL,
    [CreateOn]       DATETIME       NOT NULL,
    [CreateUserId]   NVARCHAR (50)  NOT NULL,
    [CreateBy]       NVARCHAR (50)  NOT NULL,
    [ModifiedOn]     DATETIME       NULL,
    [ModifyUserId]   NVARCHAR (50)  NULL,
    [ModifiedBy]     NVARCHAR (50)  NULL,
    CONSTRAINT [PK_Repairs] PRIMARY KEY CLUSTERED ([Id] ASC)
);






GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'评价内容', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'Evaluat';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'工单号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'WorkOrderId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'安排维修者的id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'WhoArrange';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'当前维修状态id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'statusId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'评分', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'Rate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'维修人员id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'mtStaff';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'故障设备地址', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'mtAddress';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'维修完成时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'finishMtTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'电脑编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'ComputerNumber';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'物品id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'ArticleId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'提交报修时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'applyMtTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'提交报修人员id', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Repairs', @level2type = N'COLUMN', @level2name = N'applyMtStaffid';

